﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MYSMRM.Common;


namespace MYSMRM.Model
{
    [Serializable]
    public class QSTopic
    {
        [ColumnName("I_ID")]
        public virtual int ID { get; set; }

        [ColumnName("S_TITLE")]
        public virtual String Title { get; set; }

        [ColumnName("D_START_DATE")]
        public virtual DateTime StartDate { get; set; }

        [ColumnName("D_END_DATE")]
        public virtual DateTime EndDate { get; set; }

        [ColumnName("B_AUTO_CLOSE")]
        public virtual bool AutoClose { get; set; }

        [ColumnName("B_ANONYMITY")]
        public virtual bool Anonymity { get; set; }

        [ColumnName("B_SEND_EMAIL")]
        public virtual bool SendEmail { get; set; }

        [ColumnName("S_EMAIL_ADDRESS")]
        public virtual String EmailAddress { get; set; }

        [ColumnName("S_CREATOR")]
        public virtual String Creator { get; set; }

        [ColumnName("D_CREATE_DATE")]
        public virtual DateTime CreateDate { get; set; }

        //[ColumnName("QUESTION_LIST")]
        public virtual IList<QSQuestion> QuestionList { get; set; }
        public virtual void AddList(IList<QSQuestion> list)
        {
            foreach (QSQuestion o in list)
            {
                o.ID = 0;
               // o.TopicID = ID;
                QuestionList.Add(o);
            }
        }
    }
}
